<style>
    .content {
        margin-top: 0;
    }

    .content-wrapper, .main-footer {
        margin-left: 0;
    }
</style>
<div class="content-wrapper">
    <section class="content-header">
        <h1>
            <?php echo $this->translate('首页'); ?>
            <small><?php echo $this->translate('信息概览'); ?></small>
        </h1>
    </section>

    <section class="content">
        <div class="row">
            <?php if (empty($this->serviceBind['key'])) { ?>
                <div class="col-md-12">
                    <div class="callout callout-danger">
                        <h4><?php echo $this->translate('重要提示'); ?></h4>
                        <p><?php echo $this->translate('您还没有进行服务绑定，官方建议您优先进行服务绑定处理。绑定后，可以在线进行系统更新、模板安装、插件安装等等，进一步对系统进行优化。'); ?> <a href="<?php echo $this->url('service-bind'); ?>" class="btn btn-success"><?php echo $this->translate('点击去设置服务绑定'); ?></a></p>
                    </div>
                </div>
            <?php } ?>

            <?php if ($this->newPackage == 1 || $this->pcTemplate == 1 || $this->mobileTemplate == 1) { ?>
                <div class="col-md-12">
                    <div class="box box-solid">
                        <div class="box-header with-border">
                            <i class="fa fa-bullhorn"></i>
                            <h3 class="box-title"><?php echo $this->translate('更新提示'); ?></h3>
                        </div>
                        <div class="box-body">
                            <?php if ($this->newPackage == 1) { ?>
                                <p class="text-green" style="margin: 0 0 3px;"><?php echo $this->translate('您的系统有新的更新包啦!'); ?> <a href="<?php echo $this->url('update'); ?>" class="btn btn-xs btn-success"><i class="fa fa-cloud-download"></i> <?php echo $this->translate('点击去更新'); ?></a></p>
                            <?php } ?>
                            <?php if ($this->pcTemplate == 1 || $this->mobileTemplate == 1) { ?>
                            <p class="text-aqua" style="margin: 0 0 3px;">
                                <?php if ($this->pcTemplate == 1) { ?>
                                    <?php echo $this->translate('PC模板有更新啦!'); ?> <a href="<?php echo $this->url('template'); ?>" class="btn btn-xs btn-success"><i class="fa fa-cloud-download"></i> <?php echo $this->translate('去更新'); ?></a>
                                <?php } ?>
                                <?php if ($this->mobileTemplate == 1) { ?>
                                    <?php echo $this->translate('手机模板有更新啦!'); ?> <a href="<?php echo $this->url('template', ['action' => 'mobileTemplate']); ?>" class="btn btn-xs btn-success"><i class="fa fa-cloud-download"></i> <?php echo $this->translate('去更新'); ?></a>
                                <?php } ?>
                            </p>
                            <?php } ?>

                            <!--p class="text-light-blue" style="margin: 0 0 3px;"></p-->
                        </div>
                    </div>
                </div>
            <?php } ?>
        </div>

        <div class="row">
            <div class="col-lg-3 col-xs-6">
                <div class="small-box bg-aqua">
                    <div class="inner">
                        <h3><?php echo $this->todayOrderNum; ?></h3>
                        <p><?php echo $this->translate('今日订单数量'); ?></p>
                    </div>
                    <div class="icon">
                        <i class="fa fa-shopping-cart"></i>
                    </div>
                    <a href="<?php echo $this->url('sales'); ?>" class="small-box-footer"><?php echo $this->translate('点击查看详情'); ?> <i class="fa fa-arrow-circle-right"></i></a>
                </div>
            </div>
            <div class="col-lg-3 col-xs-6">
                <div class="small-box bg-green">
                    <div class="inner">
                        <h3><?php echo $this->todayOrderAmount; ?></h3>
                        <p><?php echo $this->translate('今日订单付款金额'); ?></p>
                    </div>
                    <div class="icon">
                        <i class="fa fa-briefcase"></i>
                    </div>
                    <a href="<?php echo $this->url('sales', [], ['query' => ['order_status' => 20]]); ?>" class="small-box-footer"><?php echo $this->translate('点击查看详情'); ?> <i class="fa fa-arrow-circle-right"></i></a>
                </div>
            </div>
            <div class="col-lg-3 col-xs-6">
                <div class="small-box bg-yellow">
                    <div class="inner">
                        <h3><?php echo $this->todayUserNum; ?></h3>
                        <p><?php echo $this->translate('今日注册客户'); ?></p>
                    </div>
                    <div class="icon">
                        <i class="ion ion-person-add"></i>
                    </div>
                    <a href="<?php echo $this->url('user'); ?>" class="small-box-footer"><?php echo $this->translate('点击查看详情'); ?> <i class="fa fa-arrow-circle-right"></i></a>
                </div>
            </div>
            <div class="col-lg-3 col-xs-6">
                <div class="small-box bg-red">
                    <div class="inner">
                        <h3><?php echo $this->todayReturnNum; ?></h3>
                        <p><?php echo $this->translate('今日退换货商品'); ?></p>
                    </div>
                    <div class="icon">
                        <i class="glyphicon glyphicon-retweet"></i>
                    </div>
                    <a href="<?php echo $this->url('sales-service'); ?>" class="small-box-footer"><?php echo $this->translate('点击查看详情'); ?> <i class="fa fa-arrow-circle-right"></i></a>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-lg-6 col-xs-6">
                <div class="box box-primary">
                    <div class="box-header with-border">
                        <h3 class="box-title"><?php echo $this->translate('新闻动态'); ?></h3>
                    </div>
                    <?php if ($this->newsList) { ?>
                        <div class="box-body table-responsive no-padding">
                            <table class="table">
                                <tbody>
                                <?php foreach ($this->newsList as $newsValue) { ?>
                                <tr>
                                    <td>
                                        <a href="<?php echo $newsValue['newsUrl']; ?>" target="_blank"><?php echo $this->escapeHtml($newsValue['newsTitle']); ?></a>
                                    </td>
                                </tr>
                                <?php } ?>
                                </tbody>
                            </table>
                        </div>
                        <div class="box-footer text-center">
                            <a href="https://bbs.dbshop.net/forum.php?mod=forumdisplay&fid=2" class="uppercase"><?php echo $this->translate('查看更多新闻'); ?></a>
                        </div>
                    <?php } ?>
                </div>
            </div>
            <div class="col-lg-6 col-xs-6">
                <div class="box box-primary">
                    <div class="box-header with-border">
                        <h3 class="box-title"><?php echo $this->translate('系统信息'); ?></h3>
                    </div>
                    <div class="box-body table-responsive no-padding">
                        <table class="table table-bordered">
                            <tbody>
                            <tr>
                                <th width="15%"><?php echo $this->translate('系统版本'); ?></th>
                                <td width="35%"><?php echo DBSHOP_VERSION; ?></td>
                                <th width="15%"><?php echo $this->translate('授权信息'); ?></th>
                                <td>
                                    <?php if ($this->dbshopAuth == 1) { ?>
                                        <span class="label bg-blue"><?php echo $this->translate('已授权'); ?></span>
                                    <?php } else { ?>
                                        <?php echo $this->translate('未授权'); ?> <a href="https://www.dbshop.net/" target="_blank" class="btn btn-xs btn-success"><i class="fa fa-cart-plus" aria-hidden="true"></i> <?php echo $this->translate('获取授权'); ?></a>
                                    <?php } ?>
                                </td>
                            </tr>
                            <tr>
                                <th><?php echo $this->translate('PHP版本'); ?></th>
                                <td><?php echo phpversion(); ?></td>
                                <th><?php echo $this->translate('官方网站'); ?></th>
                                <td><a href="https://www.dbshop.net/" target="_blank">https://www.dbshop.net/</a></td>
                            </tr>
                            <tr>
                                <th><?php echo $this->translate('在线手册'); ?></th>
                                <td><a href="http://docs.loongdomsoft.com/" target="_blank">http://docs.loongdomsoft.com/</a></td>
                                <th><?php echo $this->translate('官方论坛'); ?></th>
                                <td><a href="https://bbs.dbshop.net/" target="_blank">https://bbs.dbshop.net/</a></td>
                            </tr>
                            <tr>
                                <th><?php echo $this->translate('官方QQ群'); ?></th>
                                <td>315077108</td>
                                <th></th>
                                <td></td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>

    </section>

</div>